<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登入</title>
    <link href="/admin/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="/admin/css/animate.css" rel="stylesheet">
    <link href="/admin/css/style.css" rel="stylesheet">
    <style type="text/css">
        body{
            background: url("/admin/images/background.jpg") no-repeat;
            background-size: 100% 100%;
        }
        .check-tips {
            color: #ff0000;
            margin-top: 10px;
        }
        .login-logo {
            width: 150px;
        }
        .loginscreen {
            width: 1000px !important;
            height: 360px;
            max-width: none;
            display: flex;
            padding: 0;
            position: relative;
            top: calc(50vh - 180px);
            box-shadow: 0 4px 30px rgba(34,55,79,.6);
            border-radius: 10px;
            overflow: hidden;
        }
        .loginscreen > div {
            width: 50%;
        }
        .logo-box {
            background: url("/admin/images/background.jpg") no-repeat;
            background-size: 100% 100%;
            display: -webkit-box;
            -webkit-box-align: center;
            -webkit-box-pack: center;
            position: relative;
        }
        .logo-box::after {
            content: "";
            width:100%;
            height:100%;
            position: absolute;
            left:0;
            top:0;
            background: inherit;
            filter:blur(4px);
            -webkit-filter: blur(4px);
            z-index: 2;
        }
        .logo-box > img {
            width: 175px;
            height: 175px;
            position: relative;
            z-index: 99;
        }
        .input-box {
            padding: 0 54px;
            background: #fff;
        }
        .input-box > h3 {
            font-size: 20px;
            color: #324163;
            padding: 30px 0;
            margin: 10px 0;
            text-align: left;
        }
        .form-group {
            height: 36px;
            line-height: 34px;
            display: flex;
            align-items: center;
            border: 1px solid #c2c2c2;
            border-radius: 4px;
            padding: 0 16px;
            margin-bottom: 20px;
        }
        .form-group > i {
            font-size: 16px;
        }
        .form-group > input {
            border: none;
            outline: none;
        }
        .form-group > img {
            width: 20px;
            height: 20px;
        }
        .input-box > form > a {
            float: right;
            font-size: 14px;
            color: #595959;
        }
        .check-tips {
            height: 20px;
            text-align: left;
            margin-bottom: 30px;
            font-size: 12px;
        }
        .copyright {
            position: absolute;
            top: calc(50vh + 240px);
            left: 50%;
            transform: translateX(-50%);
            font-size: 20px;
            color: #fff;
        }
        .btn-success {
            border-radius: 10px;
            margin-bottom: 15px;
        }
        .technical-support {
            font-size: 16px;
            color: #fff;
            position: absolute;
            bottom: 20px;
            right: 40px;
        }
    </style>
</head>
<body class="gray-bg">
<div class="middle-box text-center loginscreen animated fadeInDown">
    <div class="logo-box">
        <img src="/admin/images/logo-white.png" class="login-logo">
<!--        <div class="blur-box"></div>-->
    </div>
    <div class="input-box">
        <h3>排水管理有限公司oa系统</h3>
        <form class="m-t" role="form" action="{:Url('login')}" method="post">
            <div class="form-group">
                <i class="fa fa-user"></i>
                <input type="text" class="form-control" placeholder="用户名" required="" name="username">
                <img src="/admin/images/close.png" />
            </div>
            <div class="form-group" style="margin-bottom: 5px">
                <i class="fa fa-lock"></i>
                <input type="password" class="form-control" placeholder="密码" required="" name="password">
                <img src="/admin/images/close.png" />
            </div>
            <div class="check-tips"></div>
            <button type="submit" class="btn btn-success block full-width m-b">登入</button>
            <a href="{:Url('forgot_password')}"><small>忘记密码?</small></a>
            <!--<p class="text-muted text-center"><small>没有帐号?</small></p>-->
            <!--<a class="btn btn-sm btn-white btn-block" href="{:Url('register')}">创建一个新帐号</a>-->
        </form>
    </div>
</div>

<div class="copyright">版权所有：上虞排水管理有限公司</div>
<p class="technical-support">技术支持:绍兴蚱蜢网络科技有限公司 &copy; 2019-2020</p>
<!-- Mainly scripts -->
<script src="/admin/js/jquery-2.1.1.js"></script>
<script src="/admin/js/bootstrap.min.js"></script>
<script>
    //表单提交
    $(document)
        .ajaxStart(function(){
            $("button:submit").addClass("log-in").attr("disabled", true);
        })
        .ajaxStop(function(){
            $("button:submit").removeClass("log-in").attr("disabled", false);
        });

    $("form").submit(function(){
        var self = $(this);
        $.post(self.attr("action"), self.serialize(), success, "json");
        return false;

        function success(data){
            if(data.code){
                window.location.href = data.url;
            } else {
                self.find(".check-tips").text(data.msg);
            }
        }
    });
</script>
</body>
</html>
